<!DOCTYPE HTML>
<html>
<head>
    <meta charset="utf-8">
    <meta name="renderer" content="webkit|ie-comp|ie-stand">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no" />
    <meta http-equiv="Cache-Control" content="no-siteapp" />
    <!--[if lt IE 9]>
    <script type="text/javascript" src="__PUBLIC__/Admin/lib/html5.js"></script>
    <script type="text/javascript" src="__PUBLIC__/Admin/lib/respond.min.js"></script>
    <script type="text/javascript" src="__PUBLIC__/Admin/lib/PIE_IE678.js"></script>
    <![endif]-->
    <link href="__PUBLIC__/Admin/css/H-ui.min.css" rel="stylesheet" type="text/css" />
    <link href="__PUBLIC__/Admin/css/H-ui.admin.css" rel="stylesheet" type="text/css" />
    <link href="__PUBLIC__/Admin/css/style.css" rel="stylesheet" type="text/css" />
    <link href="__PUBLIC__/Admin/lib/Hui-iconfont/1.0.1/iconfont.css" rel="stylesheet" type="text/css" />
    <!--[if IE 6]>
    <script type="text/javascript" src="http://lib.h-ui.net/DD_belatedPNG_0.0.8a-min.js" ></script>
    <script>DD_belatedPNG.fix('*');</script>
    <![endif]-->
    <title>图片列表</title>
</head>
<body>
<nav class="breadcrumb"><i class="Hui-iconfont">&#xe67f;</i> 首页 <span class="c-gray en">&gt;</span> 图片管理 <span class="c-gray en">&gt;</span> 图片列表 <a class="btn btn-success radius r mr-20" style="line-height:1.6em;margin-top:3px" href="javascript:location.replace(location.href);" title="刷新" ><i class="Hui-iconfont">&#xe68f;</i></a></nav>
<div class="pd-20">
    <div class="text-c"> 日期范围：
        <input type="text" onfocus="WdatePicker({maxDate:'#F{$dp.$D(\'logmax\')||\'%y-%M-%d\'}'})" id="logmin" class="input-text Wdate" style="width:120px;">
        -
        <input type="text" onfocus="WdatePicker({minDate:'#F{$dp.$D(\'logmin\')}',maxDate:'%y-%M-%d'})" id="logmax" class="input-text Wdate" style="width:120px;">
        <input type="text" name="" id="" placeholder=" 图片名称" style="width:250px" class="input-text">
        <button name="" id="" class="btn btn-success" type="submit"><i class="Hui-iconfont">&#xe665;</i> 搜图片</button>
    </div>
    <div class="cl pd-5 bg-1 bk-gray mt-20"> <span class="l"><a href="javascript:;" onclick="datadel()" class="btn btn-danger radius"><i class="Hui-iconfont">&#xe6e2;</i> 批量删除</a> <a class="btn btn-primary radius" onclick="picture_add('添加图片','{:U('Admin/picture/addImageView')}')" href="javascript:;"><i class="Hui-iconfont">&#xe600;</i> 添加相册</a></span> <span class="r">共有数据：<strong>54</strong> 条</span> </div>
    <div class="mt-20" id="data">
    <volist name="data" id="d">
        <div class="wrapper_picture">
             <div class="wrapper_box">
             <div class="wrapper_pic_inner">
                 <if condition="$d['imageArr'] neq ''">
                     <volist name="d['imageArr']" id="img">
                             <div class="inner_layout pos{$i}"><img src="/{$img['content']}" alt=""></div>
                     </volist>
                     <else />
                     <if condition="$d['cover'] neq ''">
                           <div class="inner_layout pos1"><img src="/{$d['cover']}" alt=""></div>
                         <else/>
                          <div class="inner_layout pos1"></div>
                     </if>
                </if>
             </div>
            <div class="photo_text">{$d['cname']} <span>{$d['count']|default=0}<i class="my-iconfont photo_min_icon"></i></span></div>
            <div class="photo_intro">{$d['intro']}</div>
            <div class="photo_edit"><a href="javascript:;" onClick="picture_edit('图库编辑','{:U('Admin/picture/addImageView')}?id={$d['id']}','{$d['id']}')"><i class="my-iconfont p_edit"></i>编辑</a><a href="javascript:;" onclick="picture_del(this,{$d['id']})"><i class="my-iconfont p_del"></i>删除</a></div>
             </div>
        </div>
        </volist>
    </div>
</div>
<script type="text/javascript" src="__PUBLIC__/Admin/lib/jquery/1.9.1/jquery.min.js"></script>
<script type="text/javascript" src="__PUBLIC__/Admin/lib/layer/1.9.3/layer.js"></script>
<script type="text/javascript" src="__PUBLIC__/Admin/lib/My97DatePicker/WdatePicker.js"></script>
<script type="text/javascript" src="__PUBLIC__/Admin/js/H-ui.js"></script>
<script type="text/javascript" src="__PUBLIC__/Admin/js/H-ui.admin.js"></script>
<script type="text/javascript" src="__PUBLIC__/js/MinAjax.js"></script>
<script type="text/javascript">
    /*图片-添加*/
    function picture_add(title,url){
        var index = layer.open({
            type: 2,
            title: title,
            content: url
        });
        layer.full(index);
    }
    /*图片-查看*/
    function picture_show(title,url,id){
        var index = layer.open({
            type: 2,
            title: title,
            content: url
        });
        layer.full(index);
    }
    /*图片-编辑*/
    function picture_edit(title,url,id){
        var index = layer.open({
            type: 2,
            title: title,
            content: url
        });
        layer.full(index);
    }
    /*图片-删除*/
    function picture_del(obj,id){
        layer.confirm('确认要删除吗？',function(index){
             var url = "{:U('Admin/picture/deleteImage','','')}";
             url+="?id="+id;
             ajax({
                 type:"GET",
                 url:url,
                 dataType:"json",
                 success:function(json){
                        if(json['code']==200){
                              var data = document.getElementById('data');
                              var par = obj.parentNode.parentNode.parentNode;
                              data.removeChild(par);
                              layer.msg(json['msg'],1);
                        }
                        if(json['code']==403){
                              layer.msg(json['msg'],1);
                        }
                 }
             })
        });
    }
</script>
</body>
</html>